<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="search" v-model="key">
    </div>

    <script>
        new Vue({
            el: '#app',
            key: '',
            data: {
                key: '',
                hrf: 'https://www.baidu.com/s?wd=' + this.key
            },
            watch: {
                key(newQuestion, oldQuestion) {
                    console.log(newQuestion);
                }
            },

        })
    </script>
</body>
</html>